#! /bin/bash

# Fix the following WARNING in ~/.xsession-errors
# gnome-session[2035]: EggSMClient-WARNING: Desktop file '/home/rodrigosilva/.config/autostart/skype.desktop' has malformed Icon key 'skype.png'(should not include extension)

file="$HOME/.config/autostart/skype.desktop"
newfile="$PWD/`basename "$file"`"
oldfile="${newfile}.bak"

if [ -f "$file" ] && [ -f "$oldfile" ] ; then cp "$oldfile" "$file" ; fi

if [ -f "$newfile" ] ; then rm "$newfile" ; fi
if [ -f "$oldfile" ] ; then rm "$oldfile" ; fi

unset file newfile oldfile

